﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Infrastructure.Migrations
{
    public partial class as1 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "BreedingInfos",
                columns: table => new
                {
                    BreedingId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Breed = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Source = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FeedingDays = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Brand = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BreederInCharge = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BreedingInfos", x => x.BreedingId);
                });

            migrationBuilder.CreateTable(
                name: "DeepProcessingEnterprises",
                columns: table => new
                {
                    EnterpriseId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    CompanyName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    ProductionLicense = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DeepProcessingEnterprises", x => x.EnterpriseId);
                });

            migrationBuilder.CreateTable(
                name: "DeepProcessingInfos",
                columns: table => new
                {
                    ProcessingId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    TeamGroup = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Supervisor = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DeepProcessingInfos", x => x.ProcessingId);
                });

            migrationBuilder.CreateTable(
                name: "EnterpriseInfos",
                columns: table => new
                {
                    EnterpriseId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    FarmName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PersonInCharge = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    LivestockInventory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EnterpriseInfos", x => x.EnterpriseId);
                });

            migrationBuilder.CreateTable(
                name: "HealthCareInfos",
                columns: table => new
                {
                    HealthCareId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    FeedingDays = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HealthCareMethod = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HealthCareApproach = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HealthCareInfos", x => x.HealthCareId);
                });

            migrationBuilder.CreateTable(
                name: "ImageInfos",
                columns: table => new
                {
                    ImageId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ImageCategory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ImageUrl = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ImageInfos", x => x.ImageId);
                });

            migrationBuilder.CreateTable(
                name: "SlaughterEnterprises",
                columns: table => new
                {
                    EnterpriseId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    CompanyName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Province = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    City = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    County = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EstablishmentDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SlaughterEnterprises", x => x.EnterpriseId);
                });

            migrationBuilder.CreateTable(
                name: "SlaughterInfos",
                columns: table => new
                {
                    SlaughterId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AverageWeight = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ArrivalTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SlaughterTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SlaughterInfos", x => x.SlaughterId);
                });

            migrationBuilder.CreateTable(
                name: "TraceabilityInfos",
                columns: table => new
                {
                    TraceabilityId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ShelfLife = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionLicense = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Manufacturer = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CoverImage = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_TraceabilityInfos", x => x.TraceabilityId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "BreedingInfos");

            migrationBuilder.DropTable(
                name: "DeepProcessingEnterprises");

            migrationBuilder.DropTable(
                name: "DeepProcessingInfos");

            migrationBuilder.DropTable(
                name: "EnterpriseInfos");

            migrationBuilder.DropTable(
                name: "HealthCareInfos");

            migrationBuilder.DropTable(
                name: "ImageInfos");

            migrationBuilder.DropTable(
                name: "SlaughterEnterprises");

            migrationBuilder.DropTable(
                name: "SlaughterInfos");

            migrationBuilder.DropTable(
                name: "TraceabilityInfos");
        }
    }
}
